home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / RCS / Ioc_WriteBack.c,v < prev    next >
Encoding:
Text File  |  1991-12-11  |  2.3 KB  |  102 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.1.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.1
  10. date     89.08.30.08.38.10;  author brent;  state Exp;
  11. branches 1.1.1.1;
  12. next     ;
  13.  
  14. 1.1.1.1
  15. date     91.12.10.16.55.40;  author kupfer;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Ioc_WriteBack library procedure
  22. @
  23.  
  24.  
  25.  
  26. 1.1
  27. log
  28. @Initial revision
  29. @
  30. text
  31. @/* 
  32.  * Ioc_WriteBack.c --
  33.  *
  34.  *    Source code for the Ioc_WriteBack library procedure.
  35.  *
  36.  * Copyright 1988 Regents of the University of California
  37.  * Permission to use, copy, modify, and distribute this
  38.  * software and its documentation for any purpose and without
  39.  * fee is hereby granted, provided that the above copyright
  40.  * notice appear in all copies.  The University of California
  41.  * makes no representations about the suitability of this
  42.  * software for any purpose.  It is provided "as is" without
  43.  * express or implied warranty.
  44.  */
  45.  
  46. #ifndef lint
  47. static char rcsid[] = "$Header: Ioc_Reposition.c,v 1.2 88/07/29 17:08:46 ouster Exp $ SPRITE (Berkeley)";
  48. #endif not lint
  49.  
  50. #include <sprite.h>
  51. #include <fs.h>
  52.  
  53.  
  54. /*
  55.  *----------------------------------------------------------------------
  56.  *
  57.  * Ioc_WriteBack --
  58.  *
  59.  *    Write back cached data for a stream.  The arguments indicate
  60.  *    a byte range that should be written back.  The caller
  61.  *    has the option of blocking until the data is written out,
  62.  *    or the caller can let the write back happen asynchronously.
  63.  *
  64.  * Results:
  65.  *    A return status.
  66.  *
  67.  * Side effects:
  68.  *    Writes out cache data.
  69.  *
  70.  *----------------------------------------------------------------------
  71.  */
  72.  
  73. ReturnStatus
  74. Ioc_WriteBack(streamID, firstByte, lastByte, shouldBlock)
  75.     int streamID;        /* StreamID returned from Fs_Open */
  76.     int firstByte;        /* Index of first byte to write back */
  77.     int lastByte;        /* Index of last byte ot write back */
  78.     Boolean shouldBlock;    /* If TRUE, block until write back is done */
  79. {
  80.     register ReturnStatus status;
  81.     Ioc_WriteBackArgs args;
  82.  
  83.     args.firstByte = firstByte;
  84.     args.lastByte = lastByte;
  85.     args.shouldBlock = shouldBlock;
  86.     status = Fs_IOControl(streamID, IOC_WRITE_BACK, sizeof(Ioc_WriteBackArgs),
  87.             (Address)&args, 0, (Address) 0);
  88.     return(status);
  89. }
  90. @
  91.  
  92.  
  93. 1.1.1.1
  94. log
  95. @Initial branch for Sprite server.
  96. @
  97. text
  98. @d17 1
  99. a17 1
  100. static char rcsid[] = "$Header: /sprite/src/lib/c/syscall/RCS/Ioc_WriteBack.c,v 1.1 89/08/30 08:38:10 brent Exp $ SPRITE (Berkeley)";
  101. @
  102.